package com.jt.demo5;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;


public class User {

    //该测试类,测试单例和多例模式/
    //结论:如果获取多次对象,
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext(SpringConfig.class);
        Dog dog = context.getBean(Dog.class);
        dog.hello();
    }
}
